This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Nov 1, 2013, 9:15 AM
9 Posts

How to copy RTF Lite Thumbnail

  • Category: Application Development
  • Platform: All Platforms
  • Release: 9.0
  • Role: Developer
  • Tags:
  • Replies: 5

Is it possible to copy RTF Lite field with thumbnail from one document to another (using losscript)?

I am trying to create agent that can copy photos between personal addressbooks, and still didn't find anything usefull. Class EmbeddedImage from OpenNTF project LSGold Collection tells that in the field there is no image. If I try to extract image form the field and embedd it into another doc it is not visible.

I'm stuck.

 

Nov 4, 2013, 9:02 PM
82 Posts
Here is some code ...
Something like this (where, for this example, there is a field on the form in the destination db called Attachment to show the attachment)
Sub extractFile()
     
Dim view As NotesView,attachmentDoc As NotesDocument,object                
     
Set view = thisDB.GetView("(Attachments)")
     
Set attachmentDoc = vwTemplates.getfirstdocument()
     
Set object =attachmentDoc.GetAttachment("attachmentFileName")
     
Call object.ExtractFile ("c:\localPath\"+"attachmentFileName")
End
Sub
Sub AddFileAttachment()        
     
Dim rtitem As NotesRichTextItem
     
With reportDoc
             
Set rtitem= .CreateRichTextItem("Attachment")        
              rtitem.EmbedObject EMBED_ATTACHMENT,
"", "c:\localPath\"+"attachmentFileName"
              .save
True,False
     
End With
End
Sub
Function getFileName(doc as notesdocument) as string
Dim fileItem As NotesItem
Set fileItem = doc.GetFirstItem("$File")
getFileName = fileItem.Values(0)
End Function




Nov 6, 2013, 9:18 AM
9 Posts
Unfortunatelly it didn't help

This code works with "normal" RTF fields, but it won't work with RTF Lite thumbnail (for example in the Personal Adress book - Contact form).

I had tried it and it make copy of the attached jpg, but it didn't show up on screen, and after Edit and Save of the document by the user - attachment dissapears.

Nov 6, 2013, 3:03 PM
82 Posts
Please reply with your code and specifics
Please reply with your code and the exact detailed specifics and I will try to reproduce and resolve
Nov 7, 2013, 9:40 AM
9 Posts
Thank you

Thank you for help, but I have solved it a moment ago.

I have to use DXLExporter for first doc and DXLImporter for second doc. And extract $FILE item to transfer it between two xmls.


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal